package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallMessage;
import com.appkubes.mall.core.po.MallMessageExample;
import com.appkubes.mall.core.po.MallMessageWithBLOBs;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallMessageMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_message
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallMessageSqlProvider.class, method="countByExample")
    long countByExample(MallMessageExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_message
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallMessageSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallMessageExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_message
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_message",
        "where message_key = #{messageKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String messageKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_message
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_message (message_key, app_key, ",
        "user_key, is_read, ",
        "`state`, `type`, title, ",
        "create_time, update_time, ",
        "version, read_list, ",
        "content)",
        "values (#{messageKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{userKey,jdbcType=VARCHAR}, #{isRead,jdbcType=TINYINT}, ",
        "#{state,jdbcType=TINYINT}, #{type,jdbcType=TINYINT}, #{title,jdbcType=VARCHAR}, ",
        "#{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER}, ",
        "#{version,jdbcType=INTEGER}, #{readList,jdbcType=LONGVARCHAR}, ",
        "#{content,jdbcType=LONGVARCHAR})"
    })
    int insert(MallMessageWithBLOBs record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_message
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallMessageSqlProvider.class, method="insertSelective")
    int insertSelective(MallMessageWithBLOBs record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_message
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallMessageSqlProvider.class, method="selectByExampleWithBLOBs")
    @Results({
        @Result(column="message_key", property="messageKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="is_read", property="isRead", jdbcType=JdbcType.TINYINT),
        @Result(column="state", property="state", jdbcType=JdbcType.TINYINT),
        @Result(column="type", property="type", jdbcType=JdbcType.TINYINT),
        @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER),
        @Result(column="read_list", property="readList", jdbcType=JdbcType.LONGVARCHAR),
        @Result(column="content", property="content", jdbcType=JdbcType.LONGVARCHAR)
    })
    List<MallMessageWithBLOBs> selectByExampleWithBLOBsWithRowbounds(MallMessageExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_message
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallMessageSqlProvider.class, method="selectByExampleWithBLOBs")
    @Results({
        @Result(column="message_key", property="messageKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="is_read", property="isRead", jdbcType=JdbcType.TINYINT),
        @Result(column="state", property="state", jdbcType=JdbcType.TINYINT),
        @Result(column="type", property="type", jdbcType=JdbcType.TINYINT),
        @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER),
        @Result(column="read_list", property="readList", jdbcType=JdbcType.LONGVARCHAR),
        @Result(column="content", property="content", jdbcType=JdbcType.LONGVARCHAR)
    })
    List<MallMessageWithBLOBs> selectByExampleWithBLOBs(MallMessageExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_message
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallMessageSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="message_key", property="messageKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="is_read", property="isRead", jdbcType=JdbcType.TINYINT),
        @Result(column="state", property="state", jdbcType=JdbcType.TINYINT),
        @Result(column="type", property="type", jdbcType=JdbcType.TINYINT),
        @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallMessage> selectByExampleWithRowbounds(MallMessageExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_message
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallMessageSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="message_key", property="messageKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="is_read", property="isRead", jdbcType=JdbcType.TINYINT),
        @Result(column="state", property="state", jdbcType=JdbcType.TINYINT),
        @Result(column="type", property="type", jdbcType=JdbcType.TINYINT),
        @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallMessage> selectByExample(MallMessageExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_message
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "message_key, app_key, user_key, is_read, `state`, `type`, title, create_time, ",
        "update_time, version, read_list, content",
        "from mall_message",
        "where message_key = #{messageKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="message_key", property="messageKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="is_read", property="isRead", jdbcType=JdbcType.TINYINT),
        @Result(column="state", property="state", jdbcType=JdbcType.TINYINT),
        @Result(column="type", property="type", jdbcType=JdbcType.TINYINT),
        @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER),
        @Result(column="read_list", property="readList", jdbcType=JdbcType.LONGVARCHAR),
        @Result(column="content", property="content", jdbcType=JdbcType.LONGVARCHAR)
    })
    MallMessageWithBLOBs selectByPrimaryKey(String messageKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_message
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallMessageSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallMessageWithBLOBs record, @Param("example") MallMessageExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_message
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallMessageSqlProvider.class, method="updateByExampleWithBLOBs")
    int updateByExampleWithBLOBs(@Param("record") MallMessageWithBLOBs record, @Param("example") MallMessageExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_message
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallMessageSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallMessage record, @Param("example") MallMessageExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_message
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallMessageSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallMessageWithBLOBs record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_message
     *
     * @mbg.generated
     */
    @Update({
        "update mall_message",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "user_key = #{userKey,jdbcType=VARCHAR},",
          "is_read = #{isRead,jdbcType=TINYINT},",
          "`state` = #{state,jdbcType=TINYINT},",
          "`type` = #{type,jdbcType=TINYINT},",
          "title = #{title,jdbcType=VARCHAR},",
          "create_time = #{createTime,jdbcType=INTEGER},",
          "update_time = #{updateTime,jdbcType=INTEGER},",
          "version = #{version,jdbcType=INTEGER},",
          "read_list = #{readList,jdbcType=LONGVARCHAR},",
          "content = #{content,jdbcType=LONGVARCHAR}",
        "where message_key = #{messageKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKeyWithBLOBs(MallMessageWithBLOBs record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_message
     *
     * @mbg.generated
     */
    @Update({
        "update mall_message",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "user_key = #{userKey,jdbcType=VARCHAR},",
          "is_read = #{isRead,jdbcType=TINYINT},",
          "`state` = #{state,jdbcType=TINYINT},",
          "`type` = #{type,jdbcType=TINYINT},",
          "title = #{title,jdbcType=VARCHAR},",
          "create_time = #{createTime,jdbcType=INTEGER},",
          "update_time = #{updateTime,jdbcType=INTEGER},",
          "version = #{version,jdbcType=INTEGER}",
        "where message_key = #{messageKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallMessage record);
}